using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Domain.Hr;

/// <summary>
/// 人力-调动表
/// </summary>
[SugarTable("hr_transfer")]
public class HrTransfer:Entity
{
    /// <summary>
    /// 员工编号
    /// </summary>
    [Required]
    public long EmployeeId { get; set; }
    
    /// <summary>
    /// 员工信息
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(EmployeeId))]
    public HrEmployee EmployeeObj { get; set; }

    /// <summary>
    /// 调出部门
    /// </summary>
    [Required]
    public long OutOrgId { get; set; }
    
    /// <summary>
    /// 调出部门信息
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(OutOrgId))]
    public HrOrganization OutOrgObj { get; set; }

    /// <summary>
    /// 掉入部门
    /// </summary>
    [Required]
    public long InOrgId { get; set; }
    
    /// <summary>
    /// 掉入部门信息
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(InOrgId))]
    public HrOrganization InOrgObj { get; set; }

    /// <summary>
    /// 调动日期
    /// </summary>
    [Required]
    public DateTime TransferTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 调动原因
    /// </summary>
    public string Reason { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string UpdateUser { get; set; }


}